<template>
  <div class="loading">
    <i></i><i></i><i></i><i></i><i></i>
  </div>
</template>
<style lang="less" scoped>
.loading {
  display: flex;
  justify-content: center;
  i {
    width: 4px;
    height: 20px;
    margin-left: 5px;
    transform-origin: left bottom;
    background-color: red;
    animation: loading 1s 0.2s infinite;
    &:nth-child(2) {
      animation-delay: -0.6s;
    }
    &:nth-child(3) {
      animation-delay: -0.2s;
    }
    &:nth-child(4) {
      animation-delay: -0.5s;
    }
    &:nth-child(5) {
      animation-delay: -0.1s;
    }
  }
  @keyframes loading {
    from {
      transform: scaleY(1.2);
    }
    to {
      transform: scaleY(0.6);
    }
  }
}
</style>